<#include "include/head.ftl">
package ${NamespaceModel};

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.gov.util.Constants;

<#include "include/copyright.ftl">

/**
 * 《${tableLabel}》 实体模型
 * @author ${copyright.author}
 *
 */

@Entity
@Table(name = "${table.tableName}", schema = Constants.SCHEMA)
public class ${Po}  implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	
	<#list table.columnList as column>
	<#if column.columnName?uncap_first!="createUserID"&&column.columnName?uncap_first!="createTime"
		&&column.columnName?uncap_first!="modifyUserID"&&column.columnName?uncap_first!="modifyTime" >
		
	private ${column.columnSimpleClassName} ${column.columnName?uncap_first}; //${column.columnLabel}
	</#if>
	</#list>
	
	
	
	<#list table.columnList as column>
	<#if column.columnName?uncap_first!="createUserID"&&column.columnName?uncap_first!="createTime"
		&&column.columnName?uncap_first!="modifyUserID"&&column.columnName?uncap_first!="modifyTime" >
	
	<#if column.columnName=="id">
	   @Id
	   @GenericGenerator(name = "idGenerator", strategy = "uuid")
	   @GeneratedValue(generator = "idGenerator")
	   @Column(name = "id", unique = true, nullable = false, length = 32)
	   public ${column.columnSimpleClassName} get${column.columnName?cap_first}(){
		      return this.${column.columnName?uncap_first};
	   }
	   /**
	    * 设置"${column.columnLabel}"的值
	    * @param ${column.columnName?uncap_first} ${column.columnLabel}
	    */
	   public void set${column.columnName?cap_first}(${column.columnSimpleClassName} ${column.columnName?uncap_first}){
		      this.${column.columnName?uncap_first} = ${column.columnName?uncap_first};
	   }
	</#if>
	
	<#if column.columnName !="id">
	
	/**
	 * 取得"${column.columnLabel}"
	 * @return 返回"${column.columnLabel}"
	 */
	 @Column(name = "${column.columnName}")
	public ${column.columnSimpleClassName} get${column.columnName?cap_first}(){
		return this.${column.columnName?uncap_first};
	}
	/**
	 * 设置"${column.columnLabel}"的值
	 * @param ${column.columnName?uncap_first} ${column.columnLabel}
	 */
	public void set${column.columnName?cap_first}(${column.columnSimpleClassName} ${column.columnName?uncap_first}){
		this.${column.columnName?uncap_first} = ${column.columnName?uncap_first};
	}
	</#if>
	</#if>
	</#list>
	@Override
	public String toString(){
		StringBuilder builder = new StringBuilder();
		builder.append("${Po} [")
		<#list table.columnList as column>
		<#if column_index==0>
		.append("${column.columnName}=").append(this.get${column.columnName?cap_first}())
		<#else>
		.append(",${column.columnName}=").append(this.get${column.columnName?cap_first}())
		</#if>
		</#list>
		.append("]");
		return builder.toString();
	}
}